Skip to content

Remove dead headers#1427

Merged
bmehta001 merged 5 commits into
mainfrom
bhamehta/issue-1418-main
Apr 29, 2026
Merged

Remove dead headers#1427
bmehta001 merged 5 commits into
mainfrom
bhamehta/issue-1418-main

Conversation

@bmehta001
Copy link
Copy Markdown
Contributor

@bmehta001 bmehta001 commented Apr 20, 2026

  • Remove dead netinet6/in6.h and other imports from ODWReachability and its Objective-C unit test so Apple builds no longer fail on the private-header error from main

Fixes #1418

bmehta001 and others added 2 commits April 17, 2026 18:37
Remove the dead netinet6/in6.h imports from ODWReachability and its Objective-C unit test so Apple builds no longer fail on the private-header error from main.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bmehta001 bmehta001 requested a review from a team as a code owner April 20, 2026 11:41
#import <XCTest/XCTest.h>
#import "ODWReachability.h"

#import <sys/socket.h>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The netinet6/in6.h removal fixes #1418, but this file still uses struct sockaddr_in, AF_INET, IN_LINKLOCALNETNUM, and htonl, whose canonical headers are /.

Copy link
Copy Markdown
Contributor Author

@bmehta001 bmehta001 Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was relying on headers being brought transitively (arpa/inet.h brings in netinet/in.h and ODWReachability.h brings in SystemConfiguration, which brings in sys/socket.h), so had removed the headers, but I am now reverting that changes to keep the canonical header files where these are defined explicit. I will now only use this PR to remove dead headers.

Comment thread third_party/Reachability/ODWReachability.m
Add back the canonical sys/socket.h and netinet/in.h includes in ODWReachability.m and ODWReachabilityTests.mm while keeping the other dead imports removed. This avoids relying on transitive Apple headers in the reachability PR review.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bmehta001 bmehta001 force-pushed the bhamehta/issue-1418-main branch from 0f96478 to 7726379 Compare April 25, 2026 06:26
@bmehta001 bmehta001 requested a review from ThomsonTan April 25, 2026 06:40
@bmehta001 bmehta001 merged commit 51f5118 into main Apr 29, 2026
27 checks passed
@bmehta001 bmehta001 deleted the bhamehta/issue-1418-main branch April 29, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New compiler error in Xcode 26.4

2 participants